/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.projetoObras.view;

import br.com.projetoObras.controller.ArtistController;
import br.com.projetoObras.model.Artist;
import com.towel.swing.img.JImagePanel;
import java.awt.BorderLayout;
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ButtonGroup;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JRadioButton;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.SpringLayout;

/**
 *
 * @author Tiago
 */
public class ArtistRegistryView extends javax.swing.JPanel {

    /**
     * Creates new form VisaoCadastroArtista
     */
    
    public ArtistController artist_controller;
    public ArtistSearchView artist_search;
    public Artist artist;
    
    public MainFrame main_frame;
    
    public FotoView foto_artista;
    
    public ArtistRegistryView(ArtistController ac, MainFrame mf) throws SQLException {
        initComponents();
        btn_sex_group.add(rbt_sexo_masc);
        btn_sex_group.add(rbt_sexo_fem);
        btn_sex_group.setSelected(rbt_sexo_fem.getModel(), true);
        btn_editar.setEnabled(false);
        this.artist_controller = ac;
        txt_foto.setText(null);
        main_frame = mf;
    }
    
    public ArtistRegistryView(ArtistController ac, ArtistSearchView asv, MainFrame mf) throws SQLException {
        initComponents();
        btn_sex_group.add(rbt_sexo_masc);
        btn_sex_group.add(rbt_sexo_fem);
        btn_editar.setEnabled(true);
        this.artist_controller = ac;
        this.artist_search = asv;
        txt_foto.setText(null);
        main_frame = mf;
    }
    

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btn_sex_group = new javax.swing.ButtonGroup();
        txt_nome = new javax.swing.JTextField();
        lbl_nome = new javax.swing.JLabel();
        lbl_sobrenome = new javax.swing.JLabel();
        txt_sobrenome = new javax.swing.JTextField();
        txt_nome_civil = new javax.swing.JTextField();
        lbl_nome_civil = new javax.swing.JLabel();
        lbl_nacionalidade = new javax.swing.JLabel();
        txt_nacionalidade = new javax.swing.JTextField();
        lbl_sexo = new javax.swing.JLabel();
        lbl_cidade = new javax.swing.JLabel();
        lbl_estado = new javax.swing.JLabel();
        lbl_pais = new javax.swing.JLabel();
        txt_cidade = new javax.swing.JTextField();
        txt_estado = new javax.swing.JTextField();
        txt_pais = new javax.swing.JTextField();
        txt_data_nasc = new javax.swing.JTextField();
        lbl_data_nasc = new javax.swing.JLabel();
        lbl_data_falec = new javax.swing.JLabel();
        txt_data_falec = new javax.swing.JTextField();
        txt_contato = new javax.swing.JTextField();
        lbl_contato = new javax.swing.JLabel();
        lbl_biografia = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        txt_biografia = new javax.swing.JTextArea();
        rbt_sexo_masc = new javax.swing.JRadioButton();
        rbt_sexo_fem = new javax.swing.JRadioButton();
        btn_salvar_artista = new javax.swing.JButton();
        btn_limpar = new javax.swing.JButton();
        lbl_foto = new javax.swing.JLabel();
        txt_foto = new javax.swing.JTextField();
        btn_busca_foto = new javax.swing.JButton();
        btn_editar = new javax.swing.JButton();
        btn_excluir = new javax.swing.JButton();
        txt_status = new javax.swing.JLabel();
        btn_mostrar_foto = new javax.swing.JToggleButton();

        setMaximumSize(getSize());
        setName(""); // NOI18N

        lbl_nome.setText("Nome");

        lbl_sobrenome.setText("Sobrenome");

        lbl_nome_civil.setText("Nome Civil");

        lbl_nacionalidade.setText("Nacionalidade");

        lbl_sexo.setText("Sexo");

        lbl_cidade.setText("Cidade");

        lbl_estado.setText("Estado");

        lbl_pais.setText("País");

        lbl_data_nasc.setText("Data de Nascimento");

        lbl_data_falec.setText("Data de Falecimento");

        lbl_contato.setText("Contato");

        lbl_biografia.setText("Biografia");

        txt_biografia.setColumns(20);
        txt_biografia.setRows(5);
        jScrollPane1.setViewportView(txt_biografia);

        rbt_sexo_masc.setText("Masculino");

        rbt_sexo_fem.setText("Feminino");

        btn_salvar_artista.setText("Salvar");
        btn_salvar_artista.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_salvar_artistaActionPerformed(evt);
            }
        });

        btn_limpar.setText("Limpar");
        btn_limpar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_limparActionPerformed(evt);
            }
        });

        lbl_foto.setText("Foto");

        txt_foto.setMaximumSize(new java.awt.Dimension(10, 24));

        btn_busca_foto.setText("Buscar");
        btn_busca_foto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_busca_fotoActionPerformed(evt);
            }
        });

        btn_editar.setText("Editar");
        btn_editar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_editarActionPerformed(evt);
            }
        });

        btn_excluir.setText("Excluir");
        btn_excluir.setEnabled(false);
        btn_excluir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_excluirActionPerformed(evt);
            }
        });

        txt_status.setMaximumSize(getSize());

        btn_mostrar_foto.setText("Ver");
        btn_mostrar_foto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_mostrar_fotoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(btn_excluir))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbl_nome)
                                    .addComponent(txt_nome_civil, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(154, 154, 154)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lbl_sobrenome)
                                            .addComponent(lbl_nacionalidade)
                                            .addComponent(txt_sobrenome, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(txt_nacionalidade, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addComponent(lbl_sexo)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(rbt_sexo_masc)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(rbt_sexo_fem)))
                                .addGap(0, 70, Short.MAX_VALUE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btn_editar))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbl_nome_civil)
                            .addComponent(txt_nome, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbl_cidade)
                            .addComponent(txt_cidade, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbl_biografia)
                            .addComponent(lbl_contato)
                            .addComponent(txt_contato, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                    .addComponent(txt_estado, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(txt_pais))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                            .addComponent(txt_data_nasc, javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lbl_data_nasc, javax.swing.GroupLayout.Alignment.LEADING))
                                        .addComponent(lbl_estado))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(lbl_pais)
                                        .addComponent(lbl_data_falec, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(txt_data_falec))))
                            .addComponent(lbl_foto))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(txt_foto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(btn_busca_foto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btn_mostrar_foto)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btn_limpar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btn_salvar_artista))
                    .addComponent(txt_status, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btn_excluir)
                    .addComponent(btn_editar))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lbl_nome)
                        .addGap(2, 2, 2)
                        .addComponent(txt_nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lbl_sobrenome)
                        .addGap(2, 2, 2)
                        .addComponent(txt_sobrenome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbl_nome_civil)
                    .addComponent(lbl_nacionalidade))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txt_nome_civil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txt_nacionalidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lbl_sexo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbt_sexo_masc)
                    .addComponent(rbt_sexo_fem))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lbl_cidade)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txt_cidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbl_pais)
                    .addComponent(lbl_estado))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txt_estado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txt_pais, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lbl_data_nasc)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txt_data_nasc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lbl_data_falec)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txt_data_falec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lbl_contato)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txt_contato, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lbl_biografia)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(lbl_foto)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txt_foto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btn_busca_foto)
                    .addComponent(btn_mostrar_foto))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btn_limpar)
                    .addComponent(btn_salvar_artista))
                .addGap(2, 2, 2)
                .addComponent(txt_status, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void btn_limparActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_limparActionPerformed
        clear();
    }//GEN-LAST:event_btn_limparActionPerformed

    private void btn_busca_fotoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_busca_fotoActionPerformed
        JFileChooser fc = new JFileChooser(System.getProperty("user.dir"));
        int ret = fc.showOpenDialog(this);
        
        if (ret == JFileChooser.APPROVE_OPTION) {
            File file = fc.getSelectedFile();
            txt_foto.setText(file.getAbsolutePath());
            txt_status.setText("Foto do artista foi selecionada ..");
        }
        else
            txt_status.setText("Operacao cancelada ..");
    }//GEN-LAST:event_btn_busca_fotoActionPerformed

    private void btn_salvar_artistaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_salvar_artistaActionPerformed
        try {
            if(!btn_editar.isEnabled()) // se eh um cadastro de artista
                this.artist_controller.createArtist(this);
            else //se eh um update de artista
                this.artist_controller.updateArtist(this);
            
            txt_status.setText("Artista salvo com sucesso ..");
                
        } catch (ParseException ex) {
            Logger.getLogger(ArtistRegistryView.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex){
            Logger.getLogger(ArtistRegistryView.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex){
            Logger.getLogger(ArtistRegistryView.class.getName()).log(Level.SEVERE, null, ex);
            txt_status.setText("Problema ao salvar artista, verifique os campos ..");
        }
    }//GEN-LAST:event_btn_salvar_artistaActionPerformed

    private void btn_editarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_editarActionPerformed
        txt_nome.setEnabled(true);
        txt_sobrenome.setEnabled(true);
        txt_nome_civil.setEnabled(true);
        txt_nacionalidade.setEnabled(true);
        rbt_sexo_fem.setEnabled(true);
        rbt_sexo_masc.setEnabled(true);
        txt_cidade.setEnabled(true);
        txt_estado.setEnabled(true);
        txt_pais.setEnabled(true);
        txt_data_nasc.setEnabled(true);
        txt_data_falec.setEnabled(true);
        txt_contato.setEnabled(true);
        txt_biografia.setEnabled(true);
        txt_foto.setEnabled(true);
        
        if(artist_search.getTabela_result() != null)
            artist_search.getTabela_result().setEnabled(false);
        
        btn_excluir.setEnabled(true);
        
        txt_status.setText("Modifique os campos e salve ..");
        
    }//GEN-LAST:event_btn_editarActionPerformed

    private void btn_excluirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_excluirActionPerformed
        try {
            artist_controller.deleteArtist(this);
            artist_search.getTxt_status().setText("Artista excluído do sistema ..");
        } catch (SQLException ex) {
            Logger.getLogger(ArtistRegistryView.class.getName()).log(Level.SEVERE, null, ex);
            txt_status.setText("Erro ao excluir artista ..");
        }
    }//GEN-LAST:event_btn_excluirActionPerformed

    private void btn_mostrar_fotoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_mostrar_fotoActionPerformed
        if(foto_artista!=null && !btn_mostrar_foto.isSelected()){
            foto_artista.setVisible(false);
            return;
        }
        if(txt_foto.getText()==null || txt_foto.getText().isEmpty())
            txt_status.setText("Não existe foto selecionada para o artista ..");
        else{
            if(foto_artista == null)
            foto_artista = new FotoView();
            foto_artista.setVisible(true);
            ImageIcon img = new ImageIcon(txt_foto.getText());
            ImageIcon thumbnail = null;
            foto_artista.getLbl_foto().setBounds(this.getBounds());
            if(img.getIconWidth() > foto_artista.getLbl_foto().getWidth())
            thumbnail = new ImageIcon(
                img.getImage().getScaledInstance(foto_artista.getLbl_foto().getWidth(), -1, Image.SCALE_DEFAULT));
            else
            thumbnail = img;
            foto_artista.getLbl_foto().setIcon(thumbnail);
            main_frame.getMain_panel().add(foto_artista,BorderLayout.CENTER);
            main_frame.repaint();
            main_frame.show();
        }
    }//GEN-LAST:event_btn_mostrar_fotoActionPerformed

    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btn_busca_foto;
    private javax.swing.JButton btn_editar;
    private javax.swing.JButton btn_excluir;
    private javax.swing.JButton btn_limpar;
    private javax.swing.JToggleButton btn_mostrar_foto;
    private javax.swing.JButton btn_salvar_artista;
    private javax.swing.ButtonGroup btn_sex_group;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lbl_biografia;
    private javax.swing.JLabel lbl_cidade;
    private javax.swing.JLabel lbl_contato;
    private javax.swing.JLabel lbl_data_falec;
    private javax.swing.JLabel lbl_data_nasc;
    private javax.swing.JLabel lbl_estado;
    private javax.swing.JLabel lbl_foto;
    private javax.swing.JLabel lbl_nacionalidade;
    private javax.swing.JLabel lbl_nome;
    private javax.swing.JLabel lbl_nome_civil;
    private javax.swing.JLabel lbl_pais;
    private javax.swing.JLabel lbl_sexo;
    private javax.swing.JLabel lbl_sobrenome;
    private javax.swing.JRadioButton rbt_sexo_fem;
    private javax.swing.JRadioButton rbt_sexo_masc;
    private javax.swing.JTextArea txt_biografia;
    private javax.swing.JTextField txt_cidade;
    private javax.swing.JTextField txt_contato;
    private javax.swing.JTextField txt_data_falec;
    private javax.swing.JTextField txt_data_nasc;
    private javax.swing.JTextField txt_estado;
    private javax.swing.JTextField txt_foto;
    private javax.swing.JTextField txt_nacionalidade;
    private javax.swing.JTextField txt_nome;
    private javax.swing.JTextField txt_nome_civil;
    private javax.swing.JTextField txt_pais;
    private javax.swing.JTextField txt_sobrenome;
    private javax.swing.JLabel txt_status;
    // End of variables declaration//GEN-END:variables


    
    public void clear(){
        btn_sex_group.clearSelection();
        txt_biografia.setText(null);
        txt_cidade.setText(null);
        txt_nome_civil.setText(null);
        txt_contato.setText(null);
        txt_pais.setText(null);
        txt_data_nasc.setText(null);
        txt_data_falec.setText(null);
        txt_nome.setText(null);
        txt_nacionalidade.setText(null);
        txt_estado.setText(null);
        txt_sobrenome.setText(null);
    }

    public JButton getBtn_busca_foto() {
        return btn_busca_foto;
    }

    public JButton getBtn_limpar() {
        return btn_limpar;
    }

    public JButton getBtn_salvar_artista() {
        return btn_salvar_artista;
    }

    public ButtonGroup getBtn_sex_group() {
        return btn_sex_group;
    }

    public JTextArea getTxt_biografia() {
        return txt_biografia;
    }

    public JTextField getTxt_cidade() {
        return txt_cidade;
    }

    public JTextField getTxt_contato() {
        return txt_contato;
    }

    public JTextField getTxt_data_falec() {
        return txt_data_falec;
    }

    public JTextField getTxt_data_nasc() {
        return txt_data_nasc;
    }

    public JTextField getTxt_estado() {
        return txt_estado;
    }

    public JTextField getTxt_foto() {
        return txt_foto;
    }

    public JTextField getTxt_nacionalidade() {
        return txt_nacionalidade;
    }

    public JTextField getTxt_nome() {
        return txt_nome;
    }

    public JTextField getTxt_nome_civil() {
        return txt_nome_civil;
    }

    public JTextField getTxt_pais() {
        return txt_pais;
    }

    public JTextField getTxt_sobrenome() {
        return txt_sobrenome;
    }

    public JRadioButton getRbt_sexo_fem() {
        return rbt_sexo_fem;
    }

    public JRadioButton getRbt_sexo_masc() {
        return rbt_sexo_masc;
    }

    public JButton getBtn_editar() {
        return btn_editar;
    }

    public Artist getArtist() {
        return artist;
    }

    public void setArtist(Artist artist) {
        this.artist = artist;
    }

    public FotoView getFoto_artista() {
        return foto_artista;
    }

    public void setFoto_artista(FotoView foto_artista) {
        this.foto_artista = foto_artista;
    }

    public JButton getBtn_excluir() {
        return btn_excluir;
    }

    public void setBtn_excluir(JButton btn_excluir) {
        this.btn_excluir = btn_excluir;
    }

    public JLabel getTxt_status() {
        return txt_status;
    }

    public void setTxt_status(JLabel txt_status) {
        this.txt_status = txt_status;
    }
    
    

    
    
}
